#ifndef QPIDATA_H 
#define QPIDATA_H

#include <rlglue/Agent_common.h> /* agent_ function prototypes and RL-Glue types */
#include <rlglue/utils/C/RLStruct_util.h> /* helpful functions for allocating structs and cleaning them up */
#include <stdio.h>

#include <list>
using namespace std; 

class Transition
{
public: 

	~Transition()
	{
		//TODO: it's dangerous to free stuff here because objects get copied by copy constructor and 
		// and when the original object gets destroyed, the memory is freed! 

//		freeRLStructPointer(state); 
//		freeRLStructPointer(action); 
	}

	// clears the memory used in this object 
	void clear()
	{
		freeRLStructPointer(state); 
		freeRLStructPointer(action); 
	}

	void print(FILE* f); 
	void printInfo(FILE* f); 


	observation_t*	state; 
	action_t*		action; 
	double			reward; 
	observation_t* nextstate; 
	action_t*		piAction; //tells us what action pi would've taken 


};

class Trajectory
{
public: 

	Trajectory(); 
	~Trajectory(); 


	list<Transition> theList; 


};

#endif
